import java.util.Objects;

class Student{
    public String id;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Student student = (Student) o;
        return Objects.equals(id, student.id);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id);
    }

    public Student(String id){
        this.id=id;
    }
}
public class TestHashBuck2 {

    public static void main(String[] args) {
        HashBuck2<Student, String> hashBuck2 = new HashBuck2<>();
        Student student = new Student("123456");
        Student student2 = new Student("123456");
        int hashCode = student.hashCode();
        hashBuck2.push(student, "bit");
        String name=hashBuck2.get(student2);
        System.out.println(name);
    }
}
